Analysis of GLDS-205 from NASA GeneLab
This R markdown file was auto-generated by the iDEP website Using iDEP 0.91, originally by Steven Xijin.Ge@sdstate.edu
Ge SX, Son EW, Yao R: iDEP: an integrated web application for differential expression and pathway analysis of RNA-Seq data. BMC Bioinformatics 2018, 19(1):534. PMID:30567491
First we set up the working directory to where the files are saved.
setwd('~/Documents/HTML_R/GLDS205')
R packages and iDEP core Functions. Users can also download the iDEP_core_functions.R file. Many R packages needs to be installed first. This may take hours. Each of these packages took years to develop.So be a patient thief. Sometimes dependencies needs to be installed manually. If you are using an older version of R, and having trouble with package installation, try un-install the current version of R, delete all folders and files (C:/Program Files/R/R-3.4.3), and reinstall from scratch.
if(file.exists('iDEP_core_functions.R'))
source('iDEP_core_functions.R') else
source('https://raw.githubusercontent.com/iDEP-SDSU/idep/master/shinyapps/idep/iDEP_core_functions.R')
We are using the downloaded gene expression file where gene IDs has been converted to Ensembl gene IDs. This is because the ID conversion database is too large to download. You can use your original file if your file uses Ensembl ID, or you do not want to use the pathway files available in iDEP (or it is not available).
inputFile <- 'GLDS205_Expression.csv'
sampleInfoFile <- 'GLDS205_Sampleinfo.csv'
gldsMetadataFile <- 'GLDS205_Metadata.csv'
geneInfoFile <- 'Arabidopsis_thaliana__athaliana_eg_gene_GeneInfo.csv' #Gene symbols, location etc.
geneSetFile <- 'Arabidopsis_thaliana__athaliana_eg_gene.db' # pathway database in SQL; can be GMT format
STRING10_speciesFile <- 'https://raw.githubusercontent.com/iDEP-SDSU/idep/master/shinyapps/idep/STRING10_species.csv'
Parameters for reading data
input_missingValue <- 'geneMedian' #Missing values imputation method
input_dataFileFormat <- 1 #1- read counts, 2 FKPM/RPKM or DNA microarray
input_minCounts <- 0.5 #Min counts
input_NminSamples <- 1 #Minimum number of samples
input_countsLogStart <- 4 #Pseudo count for log CPM
input_CountsTransform <- 1 #Methods for data transformation of counts. 1-EdgeR's logCPM 2-VST, 3-rlog
readMetadata.out <- readMetadata(gldsMetadataFile)
library(knitr) # install if needed. for showing tables with kable
library(kableExtra)
kable( readMetadata.out ) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| WT_FLT_Rep1 | WT_FLT_Rep2 | WT_FLT_Rep3 | WT_FLT_Rep4 | WT_FLT_Rep5 | WT_GC_Rep1 | WT_GC_Rep2 | WT_GC_Rep3 | WT_GC_Rep4 | WT_GC_Rep5 | HSFA2KO_FLT_Rep1 | HSFA2KO_FLT_Rep2 | HSFA2KO_FLT_Rep3 | HSFA2KO_GC_Rep1 | HSFA2KO_GC_Rep2 | HSFA2KO_GC_Rep3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Sample.LongId | Atha.Col.0.HypocotylCC.WT.FLT.Rep1.Array | Atha.Col.0.HypocotylCC.WT.FLT.Rep2.Array | Atha.Col.0.HypocotylCC.WT.FLT.Rep3.Array | Atha.Col.0.HypocotylCC.WT.FLT.Rep4.Array | Atha.Col.0.HypocotylCC.WT.FLT.Rep5.Array | Atha.Col.0.HypocotylCC.WT.GC.Rep1.Array | Atha.Col.0.HypocotylCC.WT.GC.Rep2.Array | Atha.Col.0.HypocotylCC.WT.GC.Rep3.Array | Atha.Col.0.HypocotylCC.WT.GC.Rep4.Array | Atha.Col.0.HypocotylCC.WT.GC.Rep5.Array | Atha.Col.0.HypocotylCC.HSFA2.KO.FLT.Rep1.Array | Atha.Col.0.HypocotylCC.HSFA2.KO.FLT.Rep2.Array | Atha.Col.0.HypocotylCC.HSFA2.KO.FLT.Rep3.Array | Atha.Col.0.HypocotylCC.HSFA2.KO.GC.Rep1.Array | Atha.Col.0.HypocotylCC.HSFA2.KO.GC.Rep2.Array | Atha.Col.0.HypocotylCC.HSFA2.KO.GC.Rep3.Array |
| Sample.Id | Atha.Col.0.HypocotylCC.WT.FLT.Rep1 | Atha.Col.0.HypocotylCC.WT.FLT.Rep2 | Atha.Col.0.HypocotylCC.WT.FLT.Rep3 | Atha.Col.0.HypocotylCC.WT.FLT.Rep4 | Atha.Col.0.HypocotylCC.WT.FLT.Rep5 | Atha.Col.0.HypocotylCC.WT.GC.Rep1 | Atha.Col.0.HypocotylCC.WT.GC.Rep2 | Atha.Col.0.HypocotylCC.WT.GC.Rep3 | Atha.Col.0.HypocotylCC.WT.GC.Rep4 | Atha.Col.0.HypocotylCC.WT.GC.Rep5 | Atha.Col.0.HypocotylCC.HSFA2.KO.FLT.Rep1 | Atha.Col.0.HypocotylCC.HSFA2.KO.FLT.Rep2 | Atha.Col.0.HypocotylCC.HSFA2.KO.FLT.Rep3 | Atha.Col.0.HypocotylCC.HSFA2.KO.GC.Rep1 | Atha.Col.0.HypocotylCC.HSFA2.KO.GC.Rep2 | Atha.Col.0.HypocotylCC.HSFA2.KO.GC.Rep3 |
| Sample.Name | Atha_Col-0_HypocotylCC_WT_FLT_Rep1 | Atha_Col-0_HypocotylCC_WT_FLT_Rep2 | Atha_Col-0_HypocotylCC_WT_FLT_Rep3 | Atha_Col-0_HypocotylCC_WT_FLT_Rep4 | Atha_Col-0_HypocotylCC_WT_FLT_Rep5 | Atha_Col-0_HypocotylCC_WT_GC_Rep1 | Atha_Col-0_HypocotylCC_WT_GC_Rep2 | Atha_Col-0_HypocotylCC_WT_GC_Rep3 | Atha_Col-0_HypocotylCC_WT_GC_Rep4 | Atha_Col-0_HypocotylCC_WT_GC_Rep5 | Atha_Col-0_HypocotylCC_HSFA2-KO_FLT_Rep1 | Atha_Col-0_HypocotylCC_HSFA2-KO_FLT_Rep2 | Atha_Col-0_HypocotylCC_HSFA2-KO_FLT_Rep3 | Atha_Col-0_HypocotylCC_HSFA2-KO_GC_Rep1 | Atha_Col-0_HypocotylCC_HSFA2-KO_GC_Rep2 | Atha_Col-0_HypocotylCC_HSFA2-KO_GC_Rep3 |
| GLDS | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 | 205 |
| Accession | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 | GLDS-205 |
| Hardware | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC | BRIC |
| Tissue | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures | Cell cultures |
| Age | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days | 14 days |
| Organism | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana | Arabidopsis thaliana |
| Ecotype | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 | Col-0 |
| Genotype | WT | WT | WT | WT | WT | WT | WT | WT | WT | WT | hsfA2 | hsfA2 | hsfA2 | hsfA2 | hsfA2 | hsfA2 |
| Variety | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 WT | Col-0 hsfA2 | Col-0 hsfA2 | Col-0 hsfA2 | Col-0 hsfA2 | Col-0 hsfA2 | Col-0 hsfA2 |
| Radiation | Cosmic radiation | Cosmic radiation | Cosmic radiation | Cosmic radiation | Cosmic radiation | Background Earth | Background Earth | Background Earth | Background Earth | Background Earth | Cosmic radiation | Cosmic radiation | Cosmic radiation | Background Earth | Background Earth | Background Earth |
| Gravity | Microgravity | Microgravity | Microgravity | Microgravity | Microgravity | Terrestrial | Terrestrial | Terrestrial | Terrestrial | Terrestrial | Microgravity | Microgravity | Microgravity | Terrestrial | Terrestrial | Terrestrial |
| Developmental | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture | 14 day old cell culture |
| Time.series.or.Concentration.gradient | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point | Single time point |
| Light | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark | Dark |
| Assay..RNAseq. | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling | Microarray Transcription Profiling |
| Temperature | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 | 22-24 |
| Treatment.type | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment | HSFA2 functions in the physiological adaptation of undifferentiated plant cells to spaceflight microgravity environment |
| Treatment.intensity | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x |
| Treament.timing | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x | x |
| Preservation.Method. | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater | RNAlater |
readData.out <- readData(inputFile)
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
kable( head(readData.out$data) ) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| WT_FLT_Rep1 | WT_FLT_Rep2 | WT_FLT_Rep3 | WT_FLT_Rep4 | WT_FLT_Rep5 | WT_GC_Rep1 | WT_GC_Rep2 | WT_GC_Rep3 | WT_GC_Rep4 | WT_GC_Rep5 | HSFA2KO_FLT_Rep1 | HSFA2KO_FLT_Rep2 | HSFA2KO_FLT_Rep3 | HSFA2KO_GC_Rep1 | HSFA2KO_GC_Rep2 | HSFA2KO_GC_Rep3 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AT2G26150 | 3.700440 | 3.700440 | 3.700440 | 3.700440 | 3.700440 | 3.584963 | 3.459432 | 3.584963 | 3.700440 | 3.584963 | 2.807355 | 2.807355 | 2.807355 | 2.584963 | 2.584963 | 2.807355 |
| ATCG01040 | 3.584963 | 3.584963 | 3.459432 | 3.169925 | 3.584963 | 3.459432 | 3.584963 | 3.459432 | 3.459432 | 3.321928 | 3.459432 | 3.700440 | 3.169925 | 3.584963 | 3.459432 | 3.000000 |
| ATCG00440 | 3.459432 | 3.321928 | 3.169925 | 3.000000 | 3.459432 | 3.321928 | 3.321928 | 3.321928 | 3.169925 | 3.169925 | 3.169925 | 3.584963 | 3.000000 | 3.459432 | 3.169925 | 2.807355 |
| AT3G62100 | 3.000000 | 3.000000 | 3.000000 | 3.000000 | 2.584963 | 2.807355 | 3.000000 | 2.807355 | 2.807355 | 3.000000 | 3.321928 | 3.000000 | 3.169925 | 3.321928 | 3.459432 | 3.169925 |
| AT1G30700 | 2.807355 | 2.807355 | 3.000000 | 3.321928 | 2.584963 | 3.000000 | 2.807355 | 2.807355 | 2.807355 | 3.000000 | 3.321928 | 3.169925 | 3.321928 | 3.169925 | 3.321928 | 3.000000 |
| AT3G20340 | 3.321928 | 3.459432 | 3.459432 | 3.584963 | 3.700440 | 3.459432 | 3.584963 | 3.459432 | 3.584963 | 3.700440 | 3.321928 | 3.321928 | 3.169925 | 3.169925 | 3.321928 | 3.000000 |
readSampleInfo.out <- readSampleInfo(sampleInfoFile)
kable( readSampleInfo.out ) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| Gravity | Variety | |
|---|---|---|
| WT_FLT_Rep1 | Microgravity | Col0 WT |
| WT_FLT_Rep2 | Microgravity | Col0 WT |
| WT_FLT_Rep3 | Microgravity | Col0 WT |
| WT_FLT_Rep4 | Microgravity | Col0 WT |
| WT_FLT_Rep5 | Microgravity | Col0 WT |
| WT_GC_Rep1 | Terrestrial | Col0 WT |
| WT_GC_Rep2 | Terrestrial | Col0 WT |
| WT_GC_Rep3 | Terrestrial | Col0 WT |
| WT_GC_Rep4 | Terrestrial | Col0 WT |
| WT_GC_Rep5 | Terrestrial | Col0 WT |
| HSFA2KO_FLT_Rep1 | Microgravity | Col0 hsfA2 |
| HSFA2KO_FLT_Rep2 | Microgravity | Col0 hsfA2 |
| HSFA2KO_FLT_Rep3 | Microgravity | Col0 hsfA2 |
| HSFA2KO_GC_Rep1 | Terrestrial | Col0 hsfA2 |
| HSFA2KO_GC_Rep2 | Terrestrial | Col0 hsfA2 |
| HSFA2KO_GC_Rep3 | Terrestrial | Col0 hsfA2 |
input_selectOrg ="NEW"
input_selectGO <- 'GOBP' #Gene set category
input_noIDConversion = TRUE
allGeneInfo.out <- geneInfo(geneInfoFile)
converted.out = NULL
convertedData.out <- convertedData()
nGenesFilter()
## [1] "16156 genes in 16 samples. 16156 genes passed filter.\n Original gene IDs used."
convertedCounts.out <- convertedCounts() # converted counts, just for compatibility
# Read counts per library
parDefault = par()
par(mar=c(12,4,2,2))
# barplot of total read counts
x <- readData.out$rawCounts
groups = as.factor( detectGroups(colnames(x ) ) )
if(nlevels(groups)<=1 | nlevels(groups) >20 )
col1 = 'green' else
col1 = rainbow(nlevels(groups))[ groups ]
barplot( colSums(x)/1e6,
col=col1,las=3, main="Total read counts (millions)")
readCountsBias() # detecting bias in sequencing depth
## [1] 0.8646095
## [1] 0.9024904
## [1] 0.4081283
## [1] "No bias detected"
# Box plot
x = readData.out$data
boxplot(x, las = 2, col=col1,
ylab='Transformed expression levels',
main='Distribution of transformed data')
#Density plot
par(parDefault)
## Warning in par(parDefault): graphical parameter "cin" cannot be set
## Warning in par(parDefault): graphical parameter "cra" cannot be set
## Warning in par(parDefault): graphical parameter "csi" cannot be set
## Warning in par(parDefault): graphical parameter "cxy" cannot be set
## Warning in par(parDefault): graphical parameter "din" cannot be set
## Warning in par(parDefault): graphical parameter "page" cannot be set
densityPlot()
# Scatter plot of the first two samples
plot(x[,1:2],xlab=colnames(x)[1],ylab=colnames(x)[2],
main='Scatter plot of first two samples')
####plot gene or gene family
input_selectOrg ="BestMatch"
input_geneSearch <- 'HOXA' #Gene ID for searching
genePlot()
## NULL
input_useSD <- 'FALSE' #Use standard deviation instead of standard error in error bar?
geneBarPlotError()
## NULL
# hierarchical clustering tree
x <- readData.out$data
maxGene <- apply(x,1,max)
# remove bottom 25% lowly expressed genes, which inflate the PPC
x <- x[which(maxGene > quantile(maxGene)[1] ) ,]
plot(as.dendrogram(hclust2( dist2(t(x)))), ylab="1 - Pearson C.C.", type = "rectangle")
#Correlation matrix
input_labelPCC <- TRUE #Show correlation coefficient?
correlationMatrix()
# Parameters for heatmap
input_nGenes <- 500 #Top genes for heatmap
input_geneCentering <- TRUE #centering genes ?
input_sampleCentering <- FALSE #Center by sample?
input_geneNormalize <- FALSE #Normalize by gene?
input_sampleNormalize <- FALSE #Normalize by sample?
input_noSampleClustering <- FALSE #Use original sample order
input_heatmapCutoff <- 4 #Remove outliers beyond number of SDs
input_distFunctions <- 1 #which distant funciton to use
input_hclustFunctions <- 1 #Linkage type
input_heatColors1 <- 1 #Colors
input_selectFactorsHeatmap <- 'Gravity' #Sample coloring factors
png('heatmap.png', width = 10, height = 15, units = 'in', res = 300)
staticHeatmap()
dev.off()
## png
## 2
[heatmap] (heatmap.png)
heatmapPlotly() # interactive heatmap using Plotly
input_nGenesKNN <- 2000 #Number of genes fro k-Means
input_nClusters <- 4 #Number of clusters
maxGeneClustering = 12000
input_kmeansNormalization <- 'geneMean' #Normalization
input_KmeansReRun <- 0 #Random seed
distributionSD() #Distribution of standard deviations
KmeansNclusters() #Number of clusters
Kmeans.out = Kmeans() #Running K-means
KmeansHeatmap() #Heatmap for k-Means
#Read gene sets for enrichment analysis
sqlite <- dbDriver('SQLite')
input_selectGO3 <- 'GOBP' #Gene set category
input_minSetSize <- 15 #Min gene set size
input_maxSetSize <- 2000 #Max gene set size
GeneSets.out <-readGeneSets( geneSetFile,
convertedData.out, input_selectGO3,input_selectOrg,
c(input_minSetSize, input_maxSetSize) )
# Alternatively, users can use their own GMT files by
#GeneSets.out <- readGMTRobust('somefile.GMT')
results <- KmeansGO() #Enrichment analysis for k-Means clusters
results$adj.Pval <- format( results$adj.Pval,digits=3 )
kable( results, row.names=FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| Cluster | adj.Pval | Genes | Pathways |
|---|---|---|---|
| A | 2.02e-25 | 119 | Response to abiotic stimulus |
| 2.82e-17 | 99 | Response to organic substance | |
| 8.02e-15 | 82 | Response to oxygen-containing compound | |
| 3.39e-14 | 83 | Response to endogenous stimulus | |
| 3.39e-14 | 82 | Response to hormone | |
| 4.85e-14 | 67 | Response to acid chemical | |
| 6.06e-14 | 77 | Cellular response to chemical stimulus | |
| 8.14e-13 | 91 | Regulation of nucleobase-containing compound metabolic process | |
| 8.14e-13 | 88 | Regulation of RNA metabolic process | |
| 8.91e-13 | 56 | Response to inorganic substance | |
| B | 9.16e-29 | 102 | Response to abiotic stimulus |
| 3.10e-25 | 76 | Response to external stimulus | |
| 3.43e-23 | 61 | Response to external biotic stimulus | |
| 3.43e-23 | 72 | Multi-organism process | |
| 3.43e-23 | 61 | Response to other organism | |
| 5.93e-23 | 61 | Response to biotic stimulus | |
| 4.36e-22 | 87 | Response to organic substance | |
| 6.62e-20 | 74 | Response to oxygen-containing compound | |
| 9.72e-20 | 75 | Response to hormone | |
| 2.39e-19 | 75 | Response to endogenous stimulus | |
| C | 1.84e-15 | 80 | Response to abiotic stimulus |
| 4.50e-13 | 43 | Response to lipid | |
| 4.50e-13 | 63 | Response to oxygen-containing compound | |
| 6.68e-13 | 71 | Response to organic substance | |
| 1.29e-12 | 63 | Response to hormone | |
| 2.35e-12 | 63 | Response to endogenous stimulus | |
| 1.46e-11 | 75 | Multicellular organism development | |
| 1.88e-11 | 50 | Response to acid chemical | |
| 9.89e-11 | 56 | Cellular response to chemical stimulus | |
| 2.66e-10 | 28 | Cellular response to lipid | |
| D | 1.57e-25 | 99 | Response to abiotic stimulus |
| 7.47e-23 | 74 | Response to external stimulus | |
| 1.06e-20 | 87 | Response to organic substance | |
| 3.89e-19 | 76 | Response to hormone | |
| 8.57e-19 | 76 | Response to endogenous stimulus | |
| 2.32e-18 | 71 | Cellular response to chemical stimulus | |
| 2.12e-17 | 54 | Response to external biotic stimulus | |
| 2.12e-17 | 54 | Response to other organism | |
| 3.50e-17 | 54 | Response to biotic stimulus | |
| 5.27e-17 | 79 | Cell communication |
input_seedTSNE <- 0 #Random seed for t-SNE
input_colorGenes <- TRUE #Color genes in t-SNE plot?
tSNEgenePlot() #Plot genes using t-SNE
input_selectFactors <- 'Gravity' #Factor coded by color
input_selectFactors2 <- 'Variety' #Factor coded by shape
input_tsneSeed2 <- 0 #Random seed for t-SNE
#PCA, MDS and t-SNE plots
PCAplot()
MDSplot()
tSNEplot()
#Read gene sets for pathway analysis using PGSEA on principal components
input_selectGO6 <- 'GOBP'
GeneSets.out <-readGeneSets( geneSetFile,
convertedData.out, input_selectGO6,input_selectOrg,
c(input_minSetSize, input_maxSetSize) )
PCApathway() # Run PGSEA analysis
## Warning: Package 'KEGG.db' is deprecated and will be removed from Bioconductor
## version 3.12
cat( PCA2factor() ) #The correlation between PCs with factors
##
## Correlation between Principal Components (PCs) with factors
## PC1 is correlated with Variety (p=8.88e-07).
input_CountsDEGMethod <- 3 #DESeq2= 3,limma-voom=2,limma-trend=1
input_limmaPval <- 0.1 #FDR cutoff
input_limmaFC <- 2 #Fold-change cutoff
input_selectModelComprions <- 'Gravity: Microgravity vs. Terrestrial' #Selected comparisons
input_selectFactorsModel <- 'Gravity' #Selected comparisons
input_selectInteractions <- NULL #Selected comparisons
input_selectBlockFactorsModel <- NULL #Selected comparisons
factorReferenceLevels.out <- c('Gravity:Terrestrial')
limma.out <- limma()
## Warning in DESeqDataSet(se, design = design, ignoreRank): some variables in
## design formula are characters, converting to factors
## Warning in lfproc(x, y, weights = weights, cens = cens, base = base, geth =
## geth, : Estimated rdf < 1.0; not estimating variance
DEG.data.out <- DEG.data()
limma.out$comparisons
## [1] "Microgravity-Terrestrial"
input_selectComparisonsVenn = limma.out$comparisons[1:3] # use first three comparisons
input_UpDownRegulated <- FALSE #Split up and down regulated genes
vennPlot() # Venn diagram
sigGeneStats() # number of DEGs as figure
sigGeneStatsTable() # number of DEGs as table
## Comparisons Up Down
## Microgravity-Terrestrial Microgravity-Terrestrial 0 0
input_selectContrast <- 'Microgravity-Terrestrial' #Selected comparisons
selectedHeatmap.data.out <- selectedHeatmap.data()
selectedHeatmap() # heatmap for DEGs in selected comparison
## Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), : 'data' must be of a vector type, was 'NULL'
# Save gene lists and data into files
write.csv( selectedHeatmap.data()$genes, 'heatmap.data.csv')
write.csv(DEG.data(),'DEG.data.csv' )
write(AllGeneListsGMT() ,'AllGeneListsGMT.gmt')
input_selectGO2 <- 'GOBP' #Gene set category
geneListData.out <- geneListData()
volcanoPlot()
scatterPlot()
MAplot()
geneListGOTable.out <- geneListGOTable()
# Read pathway data again
GeneSets.out <-readGeneSets( geneSetFile,
convertedData.out, input_selectGO2,input_selectOrg,
c(input_minSetSize, input_maxSetSize) )
input_removeRedudantSets <- TRUE #Remove highly redundant gene sets?
results <- geneListGO() #Enrichment analysis
## Error in if (dim(results1)[2] == 1) return(results1) else {: argument is of length zero
results$adj.Pval <- format( results$adj.Pval,digits=3 )
kable( results, row.names=FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| Cluster | adj.Pval | Genes | Pathways |
|---|---|---|---|
| A | 2.02e-25 | 119 | Response to abiotic stimulus |
| 2.82e-17 | 99 | Response to organic substance | |
| 8.02e-15 | 82 | Response to oxygen-containing compound | |
| 3.39e-14 | 83 | Response to endogenous stimulus | |
| 3.39e-14 | 82 | Response to hormone | |
| 4.85e-14 | 67 | Response to acid chemical | |
| 6.06e-14 | 77 | Cellular response to chemical stimulus | |
| 8.14e-13 | 91 | Regulation of nucleobase-containing compound metabolic process | |
| 8.14e-13 | 88 | Regulation of RNA metabolic process | |
| 8.91e-13 | 56 | Response to inorganic substance | |
| B | 9.16e-29 | 102 | Response to abiotic stimulus |
| 3.10e-25 | 76 | Response to external stimulus | |
| 3.43e-23 | 61 | Response to external biotic stimulus | |
| 3.43e-23 | 72 | Multi-organism process | |
| 3.43e-23 | 61 | Response to other organism | |
| 5.93e-23 | 61 | Response to biotic stimulus | |
| 4.36e-22 | 87 | Response to organic substance | |
| 6.62e-20 | 74 | Response to oxygen-containing compound | |
| 9.72e-20 | 75 | Response to hormone | |
| 2.39e-19 | 75 | Response to endogenous stimulus | |
| C | 1.84e-15 | 80 | Response to abiotic stimulus |
| 4.50e-13 | 43 | Response to lipid | |
| 4.50e-13 | 63 | Response to oxygen-containing compound | |
| 6.68e-13 | 71 | Response to organic substance | |
| 1.29e-12 | 63 | Response to hormone | |
| 2.35e-12 | 63 | Response to endogenous stimulus | |
| 1.46e-11 | 75 | Multicellular organism development | |
| 1.88e-11 | 50 | Response to acid chemical | |
| 9.89e-11 | 56 | Cellular response to chemical stimulus | |
| 2.66e-10 | 28 | Cellular response to lipid | |
| D | 1.57e-25 | 99 | Response to abiotic stimulus |
| 7.47e-23 | 74 | Response to external stimulus | |
| 1.06e-20 | 87 | Response to organic substance | |
| 3.89e-19 | 76 | Response to hormone | |
| 8.57e-19 | 76 | Response to endogenous stimulus | |
| 2.32e-18 | 71 | Cellular response to chemical stimulus | |
| 2.12e-17 | 54 | Response to external biotic stimulus | |
| 2.12e-17 | 54 | Response to other organism | |
| 3.50e-17 | 54 | Response to biotic stimulus | |
| 5.27e-17 | 79 | Cell communication |
STRING-db API access. We need to find the taxonomy id of your species, this used by STRING. First we try to guess the ID based on iDEP’s database. Users can also skip this step and assign NCBI taxonomy id directly by findTaxonomyID.out = 10090 # mouse 10090, human 9606 etc.
STRING10_species = read.csv(STRING10_speciesFile)
ix = grep('Arabidopsis thaliana', STRING10_species$official_name )
findTaxonomyID.out <- STRING10_species[ix,1] # find taxonomyID
findTaxonomyID.out
## [1] 3702
Enrichment analysis using STRING
STRINGdb_geneList.out <- STRINGdb_geneList() #convert gene lists
## Error in names(x) <- value: 'names' attribute [2] must be the same length as the vector [1]
input_STRINGdbGO <- 'Process' #'Process', 'Component', 'Function', 'KEGG', 'Pfam', 'InterPro'
results <- stringDB_GO_enrichmentData() # enrichment using STRING
results$adj.Pval <- format( results$adj.Pval,digits=3 )
kable( results, row.names=FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
|
PPI network retrieval and analysis
input_nGenesPPI <- 100 #Number of top genes for PPI retrieval and analysis
stringDB_network1(1) #Show PPI network
## Error in stringDB_network1(1): object 'STRINGdb_geneList.out' not found
Generating interactive PPI
write(stringDB_network_link(), 'PPI_results.html') # write results to html file
## Error in stringDB_network_link(): object 'STRINGdb_geneList.out' not found
browseURL('PPI_results.html') # open in browser
input_selectContrast1 <- 'Microgravity-Terrestrial' #select Comparison
#input_selectContrast1 = limma.out$comparisons[3] # manually set
input_selectGO <- 'GOBP' #Gene set category
#input_selectGO='custom' # if custom gmt file
input_minSetSize <- 15 #Min size for gene set
input_maxSetSize <- 2000 #Max size for gene set
# Read pathway data again
GeneSets.out <-readGeneSets( geneSetFile,
convertedData.out, input_selectGO,input_selectOrg,
c(input_minSetSize, input_maxSetSize) )
input_pathwayPvalCutoff <- 0.2 #FDR cutoff
input_nPathwayShow <- 30 #Top pathways to show
input_absoluteFold <- FALSE #Use absolute values of fold-change?
input_GenePvalCutoff <- 1 #FDR to remove genes
input_pathwayMethod = 1 # 1 GAGE
gagePathwayData.out <- gagePathwayData() # pathway analysis using GAGE
results <- gagePathwayData.out #Enrichment analysis for k-Means clusters
results$adj.Pval <- format( results$adj.Pval,digits=3 )
kable( results, row.names=FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| “No significant pathway found.” | adj.Pval |
|---|---|
| No significant pathway found. | NULL |
pathwayListData.out = pathwayListData()
enrichmentPlot(pathwayListData.out, 25 )
## NULL
enrichmentNetwork(pathwayListData.out )
## Error in `[.data.frame`(x, , pvalue): undefined columns selected
enrichmentNetworkPlotly(pathwayListData.out)
## Error in `[.data.frame`(x, , pvalue): undefined columns selected
input_pathwayMethod = 3 # 1 fgsea
fgseaPathwayData.out <- fgseaPathwayData() #Pathway analysis using fgsea
## Warning in fgsea(pathways = gmt, stats = fold, minSize = input_minSetSize, :
## You are trying to run fgseaSimple. It is recommended to use fgseaMultilevel. To
## run fgseaMultilevel, you need to remove the nperm argument in the fgsea function
## call.
## Warning in preparePathwaysAndStats(pathways, stats, minSize, maxSize, gseaParam, : There are ties in the preranked stats (73.45% of the list).
## The order of those tied genes will be arbitrary, which may produce unexpected results.
results <- fgseaPathwayData.out #Enrichment analysis for k-Means clusters
results$adj.Pval <- format( results$adj.Pval,digits=3 )
kable( results, row.names=FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| Direction | GSEA analysis: Microgravity vs Terrestrial | NES | Genes | adj.Pval |
|---|---|---|---|---|
| Down | GPI anchor metabolic process | -1.7607 | 26 | 1.5e-01 |
| GPI anchor biosynthetic process | -1.7607 | 26 | 1.5e-01 | |
| Protein targeting to membrane | -1.7105 | 52 | 1.5e-01 | |
| Cortical cytoskeleton organization | -1.6681 | 43 | 1.8e-01 | |
| Phosphatidylinositol biosynthetic process | -1.6528 | 36 | 1.8e-01 | |
| Establishment of protein localization to membrane | -1.6409 | 82 | 8.9e-02 | |
| Lipoprotein metabolic process | -1.6366 | 52 | 1.8e-01 | |
| Protein lipidation | -1.6225 | 51 | 1.9e-01 | |
| Lipoprotein biosynthetic process | -1.6225 | 51 | 1.9e-01 | |
| Protein localization to membrane | -1.5956 | 100 | 9.7e-02 | |
| Membrane lipid biosynthetic process | -1.5294 | 84 | 1.8e-01 | |
| Membrane lipid metabolic process | -1.5218 | 107 | 1.4e-01 | |
| Protein targeting | -1.3961 | 203 | 1.8e-01 | |
| Microtubule-based process | -1.3931 | 189 | 1.8e-01 | |
| Intracellular protein transport | -1.3455 | 497 | 8.9e-02 | |
| Cellular protein localization | -1.3445 | 592 | 7.4e-02 | |
| Cellular macromolecule localization | -1.3385 | 620 | 7.4e-02 | |
| Translation | -1.318 | 622 | 7.4e-02 | |
| Intracellular transport | -1.3171 | 629 | 7.4e-02 | |
| Establishment of localization in cell | -1.3168 | 673 | 7.4e-02 | |
| Vesicle-mediated transport | -1.3061 | 408 | 1.8e-01 | |
| Peptide biosynthetic process | -1.3038 | 625 | 8.9e-02 | |
| Amide biosynthetic process | -1.3036 | 686 | 7.4e-02 | |
| Cellular localization | -1.2866 | 812 | 7.4e-02 | |
| Protein localization | -1.2842 | 800 | 7.4e-02 | |
| Cellular developmental process | -1.2805 | 694 | 9.7e-02 | |
| Organonitrogen compound biosynthetic process | -1.2776 | 1465 | 7.4e-02 | |
| Peptide transport | -1.2742 | 737 | 7.4e-02 | |
| Up | Photosynthetic electron transport chain | 1.662 | 46 | 1.8e-01 |
| Xylan metabolic process | 1.6491 | 44 | 2.0e-01 |
pathwayListData.out = pathwayListData()
enrichmentPlot(pathwayListData.out, 25 )
enrichmentNetwork(pathwayListData.out )
enrichmentNetworkPlotly(pathwayListData.out)
## Warning: `arrange_()` is deprecated as of dplyr 0.7.0.
## Please use `arrange()` instead.
## See vignette('programming') for more help
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_warnings()` to see where this warning was generated.
PGSEAplot() # pathway analysis using PGSEA
##
## Computing P values using ANOVA
input_selectContrast2 <- 'Microgravity-Terrestrial' #select Comparison
#input_selectContrast2 = limma.out$comparisons[3] # manually set
input_limmaPvalViz <- 0.1 #FDR to filter genes
input_limmaFCViz <- 2 #FDR to filter genes
genomePlotly() # shows fold-changes on the genome
## Warning in eval(quote(list(...)), env): NAs introduced by coercion
## Warning in genomePlotly(): NAs introduced by coercion
input_nGenesBiclust <- 1000 #Top genes for biclustering
input_biclustMethod <- 'BCCC()' #Method: 'BCCC', 'QUBIC', 'runibic' ...
biclustering.out = biclustering() # run analysis
input_selectBicluster <- 1 #select a cluster
biclustHeatmap() # heatmap for selected cluster
input_selectGO4 <- 'GOBP' #Gene set category
# Read pathway data again
GeneSets.out <-readGeneSets( geneSetFile,
convertedData.out, input_selectGO4,input_selectOrg,
c(input_minSetSize, input_maxSetSize) )
results <- geneListBclustGO() #Enrichment analysis for k-Means clusters
results$adj.Pval <- format( results$adj.Pval,digits=3 )
kable( results, row.names=FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| adj.Pval | Genes | Pathways |
|---|---|---|
| 1.8e-60 | 216 | Response to abiotic stimulus |
| 4.0e-48 | 189 | Response to organic substance |
| 2.1e-46 | 168 | Response to hormone |
| 1.7e-45 | 168 | Response to endogenous stimulus |
| 5.0e-42 | 158 | Response to oxygen-containing compound |
| 2.9e-39 | 149 | Cellular response to chemical stimulus |
| 7.1e-35 | 133 | Response to external stimulus |
| 1.3e-32 | 160 | Cell communication |
| 1.3e-32 | 106 | Response to inorganic substance |
| 2.4e-32 | 120 | Response to acid chemical |
input_mySoftPower <- 5 #SoftPower to cutoff
input_nGenesNetwork <- 1000 #Number of top genes
input_minModuleSize <- 20 #Module size minimum
wgcna.out = wgcna() # run WGCNA
## Warning: executing %dopar% sequentially: no parallel backend registered
## Power SFT.R.sq slope truncated.R.sq mean.k. median.k. max.k.
## 1 1 0.1630 0.973 0.880 347.000 349.000 510.0
## 2 2 0.0146 -0.157 0.881 166.000 161.000 320.0
## 3 3 0.3010 -0.679 0.911 92.200 85.200 218.0
## 4 4 0.5360 -1.140 0.877 55.700 48.600 158.0
## 5 5 0.6210 -1.340 0.870 35.800 29.300 118.0
## 6 6 0.6410 -1.600 0.874 24.000 18.400 91.1
## 7 7 0.7000 -1.640 0.903 16.700 12.100 72.0
## 8 8 0.7490 -1.680 0.918 12.000 8.200 58.0
## 9 9 0.7820 -1.700 0.922 8.810 5.740 47.5
## 10 10 0.8130 -1.730 0.920 6.630 4.070 39.4
## 11 12 0.8930 -1.630 0.913 3.960 2.180 28.0
## 12 14 0.8480 -1.660 0.826 2.530 1.270 20.6
## 13 16 0.8340 -1.750 0.794 1.700 0.769 17.0
## 14 18 0.8480 -1.760 0.807 1.210 0.495 14.6
## 15 20 0.3160 -2.840 0.182 0.891 0.324 12.9
## TOM calculation: adjacency..
## ..will not use multithreading.
## Fraction of slow calculations: 0.000000
## ..connectivity..
## ..matrix multiplication (system BLAS)..
## ..normalization..
## ..done.
## Error in cutree(dendro, h = heightcutoff): the 'height' component of 'tree' is not sorted (increasingly)
softPower() # soft power curve
## Error in softPower(): object 'wgcna.out' not found
modulePlot() # plot modules
## Error in modulePlot(): object 'wgcna.out' not found
listWGCNA.Modules.out = listWGCNA.Modules() #modules
## Error in listWGCNA.Modules(): object 'wgcna.out' not found
input_selectGO5 <- 'GOBP' #Gene set category
# Read pathway data again
GeneSets.out <-readGeneSets( geneSetFile,
convertedData.out, input_selectGO5,input_selectOrg,
c(input_minSetSize, input_maxSetSize) )
input_selectWGCNA.Module <- '1. turquoise (180 genes)' #Select a module
input_topGenesNetwork <- 10 #SoftPower to cutoff
input_edgeThreshold <- 0.4 #Number of top genes
moduleNetwork() # show network of top genes in selected module
## Error in moduleNetwork(): object 'wgcna.out' not found
input_removeRedudantSets <- TRUE #Remove redundant gene sets
results <- networkModuleGO() #Enrichment analysis of selected module
## Error in networkModuleGO(): object 'wgcna.out' not found
results$adj.Pval <- format( results$adj.Pval,digits=3 )
kable( results, row.names=FALSE) %>%
kable_styling(bootstrap_options = c("striped", "hover")) %>%
scroll_box(width = "100%")
| adj.Pval | Genes | Pathways |
|---|---|---|
| 1.8e-60 | 216 | Response to abiotic stimulus |
| 4.0e-48 | 189 | Response to organic substance |
| 2.1e-46 | 168 | Response to hormone |
| 1.7e-45 | 168 | Response to endogenous stimulus |
| 5.0e-42 | 158 | Response to oxygen-containing compound |
| 2.9e-39 | 149 | Cellular response to chemical stimulus |
| 7.1e-35 | 133 | Response to external stimulus |
| 1.3e-32 | 160 | Cell communication |
| 1.3e-32 | 106 | Response to inorganic substance |
| 2.4e-32 | 120 | Response to acid chemical |